{smcl}
{* *! version 0.3  29 Oct 2019}{...}
{cmd:help nddfdual}
{hline}

{title:Title}

{phang}
{bf:nddfdual} {hline 2} Solving Dual LPs for non-radial distance function in Stata

{title:Syntax}

{p 8 21 2}
{cmd:nddfdual} {it:{help varlist:inputvars}} {cmd:=} {it:{help varlist:desirable_outputvars}} {cmd::} {it:{help varlist:undesirable_outputvars}} {ifin} 
{cmd:,} {cmdab:d:mu(}{varname}{cmd:)} [{it:options}]

{synoptset 28 tabbed}{...}
{synopthdr}
{synoptline}
{syntab:Main}
{synopt:{cmdab:d:mu:(varname)}}specifies names of DMUs. It is required. 

{synopt:{cmdab:t:ime:(varname)}}specifies time period for contemporaneous production technology. If {opt time:(varname)} is not specified, global production technology is assumed. 
{p_end}

{synopt:{cmdab:seq:uential}}specifies sequential production technology.
{p_end}

{synopt:{opt wmat(name)}}specifies a weight matrix. 
The default is W=(1/(3*#.inputvars),..,1/(3*#.desirable_outputvars),...,1/(3*#.undesirable_outputvars)).
{p_end}

{synopt:{opt sav:ing(filename[,replace])}}specifies that the results be saved in {it:filename}.dta. 
{p_end}

{synopt:{opt maxiter(#)}}specifies the maximum number of iterations, which must be an integer greater than 0. The default value of maxiter is 16000.
{p_end}

{synopt:{opt tol(real)}}specifies the convergence-criterion tolerance, which must be greater than 0.  The default value of tol is 1e-8.
{p_end}

{synoptline}
{p2colreset}{...}

{title:Description}

{pstd}
{cmd:nddfdual} selects the input and output variables in the opened data set and solves Dual LPs for Slacks-based Measure of Efficiency. 




{title:Examples}

{phang}{"use ...\example_sbm.dta"}

{phang}{cmd:. nddfdual labor capital energy=gdp, dmu(id) time(t)}

{phang}{cmd:. nddfdual labor capital energy=gdp, dmu(id) sav(result)}

{phang}{cmd:. nddfdual labor capital energy=gdp:co2, dmu(id) sav(result,replace)}


{title:Saved Results}

{psee}
Macro:

{psee}
{cmd: r(file)} the stored results of {cmd:nddfdual} that have observation rows of DMUs and variable columns with input data, output data,  and virtual prices.
{p_end}


{marker references}{...}
{title:References}

{phang}
 Zhou, P., Ang, B.W., Wang H. Energy and CO2 emission performance in electricity generation: a non-radial directional distance function approach. Eur. J. Oper. Res., 2012, 221:625-635.


{title:Author}

{psee}
Kerry Du

{psee}
Xiamen University

{psee}
Xiamen, China

{psee}
E-mail: kerrydu@xmu.edu.cn
{p_end}
